package com.leadingsoft.core.dto;

/**
 * 处理页面传过来的参数
 */
public class QueryProcess {
	public static String SearchProcess(String searchArrey) {
		String[] search = searchArrey.split("=");
		return search[1];
	}
	public static String OrderProcess(String sortArrey) {
		String[] sort = sortArrey.split(",");
		for (int i = 0; i < sort[0].length(); i++) {
			if (Character.isUpperCase(sort[0].charAt(i))) {
				sort[0] = sort[0].substring(0, i) + "_" + Character.toLowerCase(sort[0].charAt(i))
						+ sort[0].substring(i + 1, sort[0].length());
			}
		}
		return sort[0] + " " + sort[1];
	}
}
